export const calculatePages = (
  content: string,
  fontSize: number,
  screenWidth: number,
  screenHeight: number
) => {
  const charsPerLine = Math.floor(screenWidth / (fontSize * 0.6));
  const linesPerPage = Math.floor(screenHeight / fontSize);
  const charsPerPage = charsPerLine * linesPerPage;
  
  const pages = [];
  let currentPos = 0;
  
  while (currentPos < content.length) {
    pages.push(content.slice(currentPos, currentPos + charsPerPage));
    currentPos += charsPerPage;
  }
  
  return pages;
};
